package com.yhd.cloud.controller;

import com.yhd.cloud.service.StockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 库存接口
 *
 * @author yinhuidong3@xiaomi.com
 * @since 2021/7/27
 */
@Slf4j
@RequestMapping("/stock")
@RestController
public class StockController {

    @Resource
    private StockService stockService;

    @GetMapping("/delStock/{skuId}/{skuNum}")
    public String delProductNumById(
            @PathVariable("skuId") Integer skuId,
            @PathVariable("skuNum") Integer skuNum
    ){
        return stockService.delStock(skuId,skuNum);
    }
}
